Get Module Attribute

Hello, I have a quick question about getting module attributes. Normally when getting an object attribute I would use probeAttr_, but I'm not having any success with that, and I'm having trouble finding the appropriate syntax for module attributes.

 

What I'm trying to get the program to do is to take the module attribute "prefix" and append it to the absolute number of the object that I'm searching for in my script.

 

Thanks for any suggestions!


fj91 - Tue Nov 03 14:29:25 EST 2015

Re: Get Module Attribute
Pekka_Makinen - Wed Nov 04 08:37:27 EST 2015

The probeAttr functions are defined in the file <your DOORS installation>\lib\dxl\utils\attrutil.inc.

 

For your problem you can use the function identifier to get the Object Identifier (check this in DXL Reference in your Help menu) or if you want to split the Prefix and Absolute number, then use

 

Module m = current

Object o = current

print m."Prefix" o."Absolute Number" ""

i.e. you can use the dot notation either for modules or objects.

Re: Get Module Attribute
fj91 - Fri Nov 06 12:49:14 EST 2015

Pekka_Makinen - Wed Nov 04 08:37:27 EST 2015

The probeAttr functions are defined in the file <your DOORS installation>\lib\dxl\utils\attrutil.inc.

 

For your problem you can use the function identifier to get the Object Identifier (check this in DXL Reference in your Help menu) or if you want to split the Prefix and Absolute number, then use

 

Module m = current

Object o = current

print m."Prefix" o."Absolute Number" ""

i.e. you can use the dot notation either for modules or objects.

I originally tried this method before, and I just retried it, but I can only get this to work with objects not module.

trying m."Prefix" gives a syntax error.

 

Thanks for the help!

Re: Get Module Attribute
dylandrush - Mon Nov 09 08:44:02 EST 2015

You could try something like the following to get the prefix:

 

Module mod = current Module
ModuleVersion mv = null ModuleVersion
ModuleProperties mp = null ModuleProperties

mv = moduleVersion(mod)
getProperties(mv, mp)
string prefix = mp."Prefix"

 

Re: Get Module Attribute
fj91 - Thu Nov 12 13:42:38 EST 2015

Thanks to both of you, I'm not sure why I was having problems getting the first way to work, because both methods work fine.

 

Thanks for the help!!!